package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.NursingPlan;
import com.zzyl.vo.NursingPlanVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface NursingPlanMapper {
    @Select("select * from nursing_plan")
    List<NursingPlanVo> getAll();

    Page<NursingPlanVo> search(String name, Integer status);

    void addNursingPlan(NursingPlan nursingPlan);

    NursingPlanVo getNursingPlanById(Long id);

    void update(NursingPlan nursingPlan);

    @Update("update nursing_plan set status = #{status} where id = #{id}")
    void status(Long id, Integer status);
    @Delete("delete from nursing_plan where id = #{id}")
    void deleteNursingProjectPlanById(Long id);
}
